from twisted.internet import gtk2reactor
gtk2reactor.install()
from twisted.internet import reactor
import gtk


class ActionFunc(object):
    def __init__(self, func, argtypes):
        self.func = func
        self.argtypes = argtypes
    def __call__(self, *a, **k):
        return self.func(*a, **k)

def action(**argtypes):
    def deco(func):
        return ActionFunc(func, argtypes)
    return deco

